<h2><%= t('.titles.section_title') %></h2>

<%= form_for(resource, as: resource_name, url: [resource_name, :password_with_policy], html: { method: :put }) do |f| %>
  <% if resource.errors.full_messages.count.positive? %>
    <%= render 'devise/shared/error_messages', resource: resource %>
  <% end %>

  <%= f.hidden_field :update_action, value: :change_password %>

  <p><%= f.label :current_password, t('.labels.current_password') %><br />
  <%= f.password_field :current_password %></p>

  <p><%= f.label :password, t('.labels.new_password') %><br />
  <%= f.password_field :password %></p>

  <p><%= f.label :password_confirmation, t('.labels.confirm_new_password') %><br />
  <%= f.password_field :password_confirmation %></p>

  <p><%= f.submit t('.buttons.change_my_password') %></p>
<% end %>
